package route

import (
	"gitee.com/liuyun-luo/MagicStreamMovies/Server/controller"
	"gitee.com/liuyun-luo/MagicStreamMovies/Server/middleware"
	"github.com/gin-gonic/gin"
)

// 设置用户相关操作的路由
func SetupUsersRouter(r *gin.Engine) {
	users := r.Group("/api/v1")

	users.Use(middleware.AuthMiddleWare()) //使用中间件
	{
		//收藏指定电影
		users.POST("/users/:user_id/movies/:movie_id/collections", controller.CollectionMovie)

		//获取用户收藏的电影
		users.GET("/users/:user_id/movies/collections", controller.GetCollectionMovies)

		//为指定的用户推荐电影
		users.GET("/users/:user_id/movies/Recommend", controller.AIRecommendMovies)

		//用户观看电影时，向AI模型发送信息
		users.POST("/users/:user_id/movies/:movie_id/AI/chat")

		//前端提交的用户观看电影过程中,向模型发送的所有消息
		users.POST("/users/:user_id/movies/:movie_id/AI/massages", controller.AIWatchTogetherMovieAllMessage)
	}
}
